import request from '@/utils/request'

// 查询出租房源列表
export function listRentalhouse(query) {
  return request({
    url: '/second/rentalhouse/list',
    method: 'get',
    params: query
  })
}

// 查询出租房源详细
export function getRentalhouse(id) {
  return request({
    url: '/second/rentalhouse/' + id,
    method: 'get'
  })
}

// 新增出租房源
export function addRentalhouse(data) {
  return request({
    url: '/second/rentalhouse',
    method: 'post',
    data: data
  })
}

// 修改出租房源
export function updateRentalhouse(data) {
  return request({
    url: '/second/rentalhouse',
    method: 'put',
    data: data
  })
}

// 删除出租房源
export function delRentalhouse(id) {
  return request({
    url: '/second/rentalhouse/' + id,
    method: 'delete'
  })
}
